using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace NoMana.Components.Text
{
    public class OutlinedText : FancyText
    {
        private const float OUTERSCALE = 1.05f;
        private const float INNERSCALE = 1.0F;

        private Color _outerColor;
        private Color _innerColor;

        public OutlinedText(Color outerColor, Color innerColor, GraphicsDevice graphics, SpriteFont font) : base( graphics, font)
        {
            _outerColor = outerColor;
            _innerColor = innerColor;
        }

        public override void DrawText(string text, Vector2 postion)
        {
            _spriteBatch.Begin();
            Vector2 textOrigin = _font.MeasureString(text);
            textOrigin /= 2;

            _spriteBatch.DrawString(_font, text, new Vector2(postion.X, postion.Y), _innerColor, 0, textOrigin, INNERSCALE, SpriteEffects.None, 0);

            _spriteBatch.End();
        }

    }
}
